<?php
$login = array(
	'name'	=> 'login',
	'id'	=> 'login',
	'value' => set_value('login'),
	'maxlength'	=> 80,
	'size'	=> 30,
	'class' =>'textfield4'
);
if ($login_by_username AND $login_by_email) {
	$login_label = 'Email or login';
} else if ($login_by_username) {
	$login_label = 'Login';
} else {
	$login_label = 'Email';
}
$password = array(
	'name'	=> 'password',
	'id'	=> 'password',
	'size'	=> 30,
	'class' =>'textfield4'
);
$remember = array(
	'name'	=> 'remember',
	'id'	=> 'remember',
	'value'	=> 1,
	'checked'	=> set_value('remember'),
	'style' => 'margin:0;padding:0',
);
$captcha = array(
	'name'	=> 'captcha',
	'id'	=> 'captcha',
	'maxlength'	=> 8,
);
?>
<?php
$this->adgeek_view->header();
?>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
                    <tbody>
                    <tr>
                      <td align="center" width="763" valign="top" height="22"><table cellspacing="0" cellpadding="0" border="0" width="472">
                          <tbody><tr>
                          <td height="25">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center" width="472" valign="top" height="282">
<?php echo form_open($this->uri->uri_string(),array('id'=>'login_form')); ?>
<table cellspacing="0" cellpadding="0" border="0" width="334">
                            <tbody><tr>
                              <td height="45">&nbsp;</td>
                            </tr>
                            <tr align="left">
                              <td height="20" class="h2">Backyard Login</td>
                            </tr>
                            <tr>
                              <td height="10"></td>
                            </tr>
                            <tr>
                              <td height="20"><table cellspacing="0" cellpadding="0" border="0" width="334">
                                <tbody><tr>
                                  <td align="left" width="104" class="login_font"><?php echo form_label($login_label, $login['id']); ?></td>
                                  <td><?php echo form_input($login); ?></td>
                                </tr>
								<tr><td style="color: red;"><?php echo form_error($login['name']); ?><?php echo isset($errors[$login['name']])?$errors[$login['name']]:''; ?></td>
								</tr>
                              </tbody></table></td>
                            </tr>
                            <tr>
                              <td height="20">&nbsp;</td>
                            </tr>
                            <tr align="left">
                              <td height="20"><table cellspacing="0" cellpadding="0" border="0" width="334">
                                <tbody><tr>
								  <td align="left" width="104" class="login_font"><?php echo form_label('Password', $password['id']); ?></td>
                                  <td><?php echo form_password($password); ?></td>
                                </tr>
								<tr><td style="color: red;"><?php echo form_error($password['name']); ?><?php echo isset($errors[$password['name']])?$errors[$password['name']]:''; ?></td>
								</tr>
                              </tbody></table></td>
                            </tr>
                            <tr align="left">
                              <td height="20">&nbsp;</td>
                            </tr>
							<tr align="left">
                              <td height="20"><table width="334" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td>&nbsp;</td>
                                  <td width="157"><!--<table width="157" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td width="157" height="32" align="center" valign="middle" background="/images/apply_btn.jpg"><a href="/auth/register" class="login_link">Apply new account</a></td>
                                    </tr>
                                  </table>--></td>
                                  <td width="15">&nbsp;</td>
                                  <td width="85"><table width="85" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td width="85" height="32" align="center" valign="middle" ><a class="login_link" href="javascript:;" onclick="document.getElementById('login_form').submit(); return false;">Login</a></td></td>
                                    </tr>
                                  </table></td>
                                </tr>
                              </table></td>
                            </tr>
							<tr align="left">
                              <td height="20">&nbsp;</td>
                            </tr>
                            <!--
							<tr align="left">
                              <td height="20" style="text-align:right;"><a href="/auth/forgot_password" style="color:#666666;text-decoration:none;">忘記密碼？</a></td>
                            </tr>
                            -->
                          </tbody></table>
                          <?php echo form_close(); ?></td>
                        </tr>
                      
                      </tbody></table>
                       </td>
                    </tr>
                  </tbody></table>
<?php
$this->adgeek_view->footer();

?>